{\rtf1\ansi\deff0\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fnil\fprq0\fcharset0 Courier New;}{\f3\froman\fprq2\fcharset0 Thorndale{\*\falt Times New Roman};}{\f4\fswiss\fprq2\fcharset0 Albany{\*\falt Arial};}{\f5\fnil\fprq2\fcharset0 Arial;}{\f6\fnil\fprq0\fcharset0 Verdana;}{\f7\fnil\fprq2\fcharset0 HG Mincho Light J{\*\falt msmincho};}{\f8\fnil\fprq2\fcharset0 Arial Unicode MS;}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue128;\red255\green255\blue255;\red128\green128\blue128;}
{\stylesheet{\s1\li86\ri86\lin86\rin86\fi0\sb86\sa86\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\snext1 Normal;}
{\s2\li86\ri86\lin86\rin86\fi0\sb240\sa283\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs28\lang255\ltrch\dbch\af7\langfe255\hich\f4\fs28\lang1033\loch\f4\fs28\lang1033\sbasedon1\snext3 Heading;}
{\s3\li0\ri0\lin0\rin0\fi0\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\sbasedon1\snext3 Body Text;}
{\s4\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\sbasedon3\snext4 List;}
{\s5\li86\ri86\lin86\rin86\fi0\sb120\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs24\lang255\ai\ltrch\dbch\af6\langfe255\hich\f6\fs24\lang1033\i\loch\f6\fs24\lang1033\i\sbasedon1\snext5 caption;}
{\s6\li86\ri86\lin86\rin86\fi0\sb86\sa86\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\sbasedon1\snext6 Index;}
{\s7\li86\ri86\lin86\rin86\fi0\sa283\brdrb\brdrdb\brdrw15\brdrcf4\brsp0{\*\brdrb\brdlncol4\brdlnin1\brdlnout1\brdlndist20}\brsp0\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs12\lang1033\loch\f6\fs12\lang1033\sbasedon1\snext3 Horizontal Line;}
{\s8\li86\ri86\lin86\rin86\fi0\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\i\loch\f6\fs20\lang1033\i\sbasedon1\snext8 envelope return;}
{\s9\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\sbasedon3\snext9 Table Contents;}
{\s10\li86\ri86\lin86\rin86\fi0\sb86\sa86\cf0{\*\tlswg8236}\tqc\tx4904{\*\tlswg8236}\tqr\tx9723{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\sbasedon1\snext10 footer;}
{\s11\li86\ri86\lin86\rin86\fi0\sb86\sa86\cf0{\*\tlswg8236}\tqc\tx4904{\*\tlswg8236}\tqr\tx9723{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033\sbasedon1\snext11 header;}
{\s12\li86\ri86\lin86\rin86\fi0\sb240\sa283\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs48\lang255\ab\ltrch\dbch\af7\langfe255\hich\f3\fs48\lang1033\b\loch\f3\fs48\lang1033\b\sbasedon2\snext3{\*\soutlvl0} heading 1;}
{\s13\li86\ri86\lin86\rin86\fi0\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af2\afs20\lang255\ltrch\dbch\af2\langfe255\hich\f2\fs20\lang1033\loch\f2\fs20\lang1033\sbasedon1\snext13 Preformatted Text;}
{\*\cs15\cf0\rtlch\af5\afs24\lang255\ltrch\dbch\af5\langfe255\hich\f0\fs24\lang1033\loch\f0\fs24\lang1033 Endnote Symbol;}
{\*\cs16\cf0\rtlch\af5\afs24\lang255\ltrch\dbch\af5\langfe255\hich\f0\fs24\lang1033\loch\f0\fs24\lang1033 Footnote Symbol;}
{\*\cs17\cf2\ul\ulc0\rtlch\af5\afs24\lang255\ltrch\dbch\af5\langfe255\hich\f0\fs24\lang1033\loch\f0\fs24\lang1033 Internet link;}
}
{\info{\title DatePickerUC_ascx_cs}{\creatim\yr2009\mo4\dy22\hr4\min22}{\revtim\yr1601\mo1\dy1\hr0\min0}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6800}}\deftab709
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt0 Standard;}
{\pgdsc1\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\pgdscnxt1 Endnote;}
{\pgdsc2\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn567\margtsxn567\margbsxn567{\cbpat3}\pgdscnxt2 HTML;}}
{\*\pgdscno2}\paperh15840\paperw12240\margl1134\margr567\margt567\margb567\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn567\margtsxn567\margbsxn567{\cbpat3}\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain \ltrpar\s3\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li0\ri0\lin0\rin0\fi0\rtlch\af6\afs20\lang255\ltrch\dbch\af6\langfe255\hich\f6\fs20\lang1033\loch\f6\fs20\lang1033 {\rtlch \ltrch\loch\f6\fs20\lang1033\i0\b0 using System;\line using System.Data;\line using System.Configuration;\line using System.Collections;\line using System.Web;\line using System.Web.Security;\line using System.Web.UI;\line using System.Web.UI.WebControls;\line using System.Web.UI.WebControls.WebParts;\line using System.Web.UI.HtmlCont
rols;\line \line using VerusHedge.Common;\line using VerusHedge.Process;\line using VerusHedge.Entities;\line using VerusHedge.DataAccess;\line using VerusHedge.Entities.Issue;\line using VerusHedge.Entities.Issuer;\line using VerusHedge.Entities.FinancialInstitution;\line using VerusHedge.UI.Web;\line \line [
ValidationProperty("DateString")]//This is used to specify which property is compaired when this user control name is specified in the controltovalidate property of an external validater\line public partial class DatePickerUC : UserControl\line \{\line private string _dat
eFormat = "MM/dd/yyyy";\line private bool _required = false;\line private bool _hasExternalComparer;\line private ConstantsTS.PageMode _pageMode = ConstantsTS.PageMode.Edit;\line \line protected void Page_PreRender(object sender, EventArgs e)\line \{\line imgDate.Attributes.Add("onclick", "j
avascript:CFUI.OpenCalendar('" + txtDate.ClientID + "','','',0)");\line \}\line \line \line public string ValidationGroup\line \{\line get \{ return reqDate.ValidationGroup; \}\line set\line \{\line reqDate.ValidationGroup = value;\line cmpDate.ValidationGroup = value;\line \}\line \}\line \line public bool Required\line \{\line get \{ return 
_required; \}\line set\line \{\line _required = value;\line \line spnReqNotation.Visible = value && _pageMode == ConstantsTS.PageMode.Edit;\line reqDate.Enabled = value && _pageMode == ConstantsTS.PageMode.Edit;\line reqDate.Visible = value && _pageMode == ConstantsTS.PageMode.Edit;\line \}\line \}\line \line \line \line pu
blic bool HasExternalComparer\line \{\line get \{ return _hasExternalComparer; \}\line set\line \{\line _hasExternalComparer = value;\line cmpDate.Enabled = !value;\line \}\line \}\line \line public DateTime? Date\line \{\line get\line \{\line DateTime value;\line \line if (DateTime.TryParse(txtDate.Text, out value))\line return value;\line else\line return
 null;\line \}\line set\line \{\line txtDate.Text = value.HasValue ? value.Value.ToString(_dateFormat) : "";\line lblDate.Text = txtDate.Text;\line \}\line \}\line \line // for Ex [ValidationProperty("DateString")]\line public string DateString\line \{\line get\line \{\line DateTime value;\line \line if (DateTime.TryParse(txtDate.Text, out 
value))\line return value.ToString(_dateFormat);\line else\line return null;\line \}\line \}\line \line \line //how to use this UC with external Validators\line //<asp:CompareValidator ID="cmpDate" runat="server" Display="Dynamic" ErrorMessage="Invalid Date" Operator="DataTypeCheck" Type="Date" Validat
ionGroup="IssueDetails" ControlToValidate="instance of this UC" EnableClientScript="true" SetFocusOnError="true"></asp:CompareValidator>\line \}}
\par }